import { createRouter, createWebHistory } from "vue-router";
import HomeGame from "@vs/Home-Game/Home-Game";

export const routes = [
  {
    path: "/information",
    name: "information",
    component: () => import("@vs/Account-Information/Account-Information.vue"),
    auth: "any",
    menu: {
      show: true
    }
  },
  {
    path: "/",
    name: "home",
    component: () => import("@vs/Home/Home-Page.vue"),
    auth: "any",
    menu: {
      show: false
    }
  },

  {
    path: "/game-list",
    name: "game-list",
    component: HomeGame,
    auth: "any",
    menu: {
      show: false
    }
  },
  {
    path: "/question-add",
    name: "question-add",
    component: () => import("@vs/Question-Editor/Question-Editor.vue"),
    auth: "any",
    menu: {
      show: true
    }
  },
  {
    path: "/analysis",
    name: "analysis",
    component: () => import("@vs/Analysis/V-Analysis.vue"),
    auth: "any",
    menu: {
      show: true
    }
  },
  {
    path: "/setting",
    name: "setting",
    component: () => import("@vs/Setting/V-Setting.vue"),
    auth: "any",
    menu: {
      show: true
    }
  },

  {
    path: "/question-generation",
    name: "question-generation",
    component: () => import("@vs/Question-Generation/Question-Generation-Main.vue"),
    auth: "any",
    menu: {
      show: true
    }
  },
  {
    path: "/sign-up",
    name: "sign-up",
    component: () => import("@vs/Register/Sign-Up.vue"),
    auth: "any",
    menu: {
      show: false
    }
  },
  {
    path: "/forget-password",
    name: "forget-password",
    component: () => import("@vs/Forget-Password/Forget-Password.vue"),
    auth: "any",
    menu: {
      show: false
    }
  },
  {
    path: "/subject-page",
    name: "subject-page",
    component: () => import("@/views/Home/Subject-Page/Subject-Page.vue"),
    auth: "any",
    menu: {
      show: false
    }
  },  {
    path: "/subject-page",
    name: "subject-page",
    component: () => import("@/views/Home/Subject-Page/Subject-Page.vue"),
    auth: "any",
    menu: {
      show: false
    }
  },  {
    path: "/subject-page",
    name: "subject-page",
    component: () => import("@/views/Home/Subject-Page/Subject-Page.vue"),
    auth: "any",
    menu: {
      show: false
    }
  },  {
    path: "/subject-page",
    name: "subject-page",
    component: () => import("@/views/Home/Subject-Page/Subject-Page.vue"),
    auth: "any",
    menu: {
      show: false
    }
  },
  {
    path: "/login",
    name: "登录",
    component: () => import("@vs/Login/Login-View.vue"),
    menu: {
      show: false
    },
    auth: "any"
  },
  {
    path: "/403",
    name: "无权限访问",
    component: () => import("@vs/403/Permission-Denied.vue"),

    auth: "any",
    menu: {
      show: false
    }
  },
  {
    name: "页面不存在",
    auth: "any",
    path: "/:pathMatch(.*)*",
    component: () => import("@vs/404/Not-Found.vue"),

    menu: {
      show: false
    }
  }
];
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  // @ts-ignore
  routes
});

export default router;
